<%@include file="_header.jsp"%>

<title>32Learn</title>
</head>
<body>
    <c:choose>
        <c:when test="${userLevel != 2 && userLevel != 3}">
            <%@include file="errorPage.jsp"%>
        </c:when><c:otherwise>
            <%@include file="_menu.jsp"%>

            <div class="wrappermain">


                <div class="digitalclass">
                    <div id="subheader"><a href="#">Self-test<div id="bar-textcontent"></div></div>


                    <div class="main-digital">
                        <c:if test="${aantalnieuwevragen != null}"><form  method="post" action="manage_selftest"></c:if>
                            <c:if test="${aantalnieuwevragen == null}"><form  method="get" action="manage_selftest"></c:if>

                                <c:if test="${moduleid != null}"><input type="hidden" name="moduleid" id="moduleid" value="${moduleid}"></c:if>
                                <c:if test="${courseid != null}"><input type="hidden" name="courseid" id="courseid" value="${courseid}"></c:if>

                                <input type="hidden" name="vraagid" id="vraagid" value="${vraag.vraagid}">
                                <input type="hidden" name="currentvraag" id="currentvraag" value="${currentvraag}">
                                <c:if test="${newmoduleid != null}">
                                    <input type="hidden" id="newmoduleid" name="newmoduleid" value="${newmoduleid}">
                                </c:if>
                                <c:if test="${aantalnieuwevragen != null}">
                                    <input type="hidden" id="aantalnieuwevragen" name="aantalnieuwevragen" value="${aantalnieuwevragen}">
                                </c:if>

                                <table>
                                    <tr>
                                        <td>${inhoud.manageSTT}:</td>
                                        <td><input type="textfield" name="vraagstelling" id="vraagstelling" value="${vraag.vraagstelling}"></td>
                                    </tr>
                                    <tr>
                                        <td>${inhoud.manageSTT2} A:</td>
                                        <td><input type="textfield" name="antwoord-a" id="antwoord-a" value="${vraag.antwoord_A}"></td>
                                    </tr>
                                    <tr>
                                        <td>${inhoud.manageSTT2} B:</td>
                                        <td><input type="textfield" name="antwoord-b" id="antwoord-b" value="${vraag.antwoord_B}"></td>
                                    </tr>
                                    <tr>
                                        <td>${inhoud.manageSTT2} C:</td>
                                        <td><input type="textfield" name="antwoord-c" id="antwoord-c" value="${vraag.antwoord_C}"></td>
                                    </tr>
                                    <tr>
                                        <td>${inhoud.manageSTT2} D:</td>
                                        <td><input type="textfield" name="antwoord-d" id="antwoord-d" value="${vraag.antwoord_D}"></td>
                                    </tr>
                                    <tr>
                                        <td>${inhoud.selfTestT}:</td>
                                        <td><input type="textfield" name="juiste-antwoord" id="juiste-antwoord" value="${vraag.juiste_antwoord}"></td>
                                    </tr>
                                    <c:if test="${aantalnieuwevragen == null}">
                                        <tr>
                                            <td><c:if test="${(currentvraag + 1) > 1}"><input type="submit" name="submit" value="${inhoud.manageSTT3}"></c:if></td>
                                            <td><input type="submit" name="submit" value="${inhoud.manageSTT4}"></td>
                                            <td><c:if test="${(currentvraag + 1) < aantalvragen}"><input type="submit" name="submit" value="${inhoud.manageSTT5}"></c:if></td>
                                        </tr>
                                    </c:if>

                                    <c:if test="${aantalnieuwevragen != null}">
                                        <tr>
                                            <td></td>
                                            <td><c:if test="${aantalnieuwevragen == currentvraag + 1}"><input type="submit" name="submit" value="${inhoud.manageSTT4}"></c:if></td>
                                            <td><c:if test="${aantalnieuwevragen > currentvraag + 1}"><input type="submit" name="submit" value="${inhoud.manageSTT5}"></c:if></td>
                                        </tr>
                                    </c:if>
                                </table>

                            </form>
                            <br>
                            </div>
                            </div>
                            </div>

                        </c:otherwise></c:choose>
                    </body>
                    </html>
